package e

import "log"

const (
	FOREGROUND_ = 30
	BACKGROUND_ = 40
)

const (
	BLACK  = 0
	RED    = 1
	GREEN  = 2
	YELLOW = 3
	BLUE   = 4
	PURPLE = 5
	CYAN   = 6
	WHITE  = 7
)

func GetColor(foreground uint8, color uint8) uint8 {
	return foreground + color
}

func ErrorLogPrintln(str string) {
	log.Printf("\x1b[0;%dm%s\x1b[0m", GetColor(FOREGROUND_, RED), str)
}

func SuccessLogPrintln(str string) {
	log.Printf("\x1b[0;%dm%s\x1b[0m", GetColor(FOREGROUND_, CYAN), str)
}

func WarmingLogPrintln(str string) {
	log.Printf("\x1b[0;%dm%s\x1b[0m", GetColor(FOREGROUND_, YELLOW), str)
}
